package com.fzj.charging.order.feign;

import com.fzj.charging.common.pojo.JsonResult;
import com.fzj.charging.common.pojo.param.GunStatusUpdateParam;
import com.fzj.charging.common.pojo.vo.StationInfoVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

//@FeignClient用于声明一个接口是一个 Feign 客户端，这样 Spring Cloud 就可以通过 Feign 来实现对该接口的远程调用
//服务名称："deviceService" 是你想要通过 Feign 客户端调用的远程服务的名称。这个名称应该与远程服务在服务注册中心注册的名称相匹配。
@FeignClient("deviceService")
public interface DeviceClient {
    @GetMapping("device/station/info/{gunId}")//这里的路径要写完整
    JsonResult<StationInfoVO> getStationInfo(@PathVariable Integer gunId);

    @PostMapping("device/station/gun/status/update")
    JsonResult<Boolean> updateGunStatus(@RequestBody GunStatusUpdateParam gunStatusUpdateParam);

}
